#include <Arduino.h>
#include "DS3231Task/DS3231Task.h"
#include "OLEDTask/OLEDTask.h"
#include "WS2812Task/WS2812Task.h"
#include "BUZZERTask/BUZZERTask.h"
#include "ultrasonicSensorTask.h"

#define MY_SDA 14
#define MY_SCl 27

extern TaskHandle_t ds3231TaskHand;
extern TaskHandle_t OLEDTaskHand;
extern TaskHandle_t WS2812TaskHand;
extern TaskHandle_t buzzerTaskHand;
extern TaskHandle_t ultrasonicSensorTaskHand;
void setup()
{
    Serial.begin(115200);
    Wire.begin(MY_SDA, MY_SCl);
    pinMode(5, OUTPUT);
    pinMode(17, OUTPUT);
    pinMode(16, OUTPUT);
    xTaskCreatePinnedToCore(ds3231Task, "ds3231Task", 1024 * 50, nullptr, 1, &ds3231TaskHand, 1);
    xTaskCreatePinnedToCore(OLEDTask, "OLEDTask", 1024 * 50, nullptr, 1, &OLEDTaskHand, 1);
    xTaskCreatePinnedToCore(WS2812Task, "WS2812Task", 1024 * 50, nullptr, 1, &WS2812TaskHand, 1);
    xTaskCreatePinnedToCore(ultrasonicSensorTask, "ultrasonicSensorTask", 1024 * 10, nullptr, 1, &ultrasonicSensorTaskHand, 1);
    xTaskCreatePinnedToCore(buzzerTask, "buzzerTask", 1024, nullptr, 1, &buzzerTaskHand, 1);




    vTaskDelete(nullptr);
}

void loop()
{

}